{ "cells": [ { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Working on a Windows 10\n", "Python version 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:40:50) [MSC v.1937 64 bit (AMD64)]\n", "Pandas version 2.2.3\n", "bifacial_radiance version 0.5.0b2.dev4+gedb973d.d20250924\n" ] } ], "source": [ "# This information helps with debugging and getting support :)\n", "import sys, platform\n", "import pandas as pd\n", "import bifacial_radiance as br\n", "import pprint\n", "print(\"Working on a \", platform.system(), platform.release())\n", "print(\"Python version \", sys.version)\n", "print(\"Pandas version \", pd.__version__)\n", "print(\"bifacial_radiance version \", br.__version__)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 6 - Exploring Trackerdict Structure\n", "\n", "Tutorial 6 gives a good, detailed introduction to the trackerdict structure step by step.\n", "Here is a condensed summary of functions you can use to explore the tracker dictionary.\n", "\n", "\n", "***Steps:***\n", "\n", "1. Create a short Simulation + tracker dictionary beginning to end for 1 day \n", "2. Explore the tracker dictionary \n", "3. Explore Save Options " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Create a short Simulation + tracker dictionary beginning to end for 1 day" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "path = C:\\Users\\cdeline\\Documents\\Python Scripts\\Bifacial_Radiance\\bifacial_radiance\\TEMP\\Tutorial_06\n", "Making path: images\n", "Making path: objects\n", "Making path: results\n", "Making path: skies\n", "Making path: EPWs\n", "Making path: materials\n", "Loading albedo, 1 value(s), 0.213 avg\n", "1 nonzero albedo values.\n", "Getting weather file: USA_VA_Richmond.724010_TMY2.epw\n", " ... OK!\n", "8760 line in WeatherFile. Assuming this is a standard hourly WeatherFile for the year for purposes of saving Gencumulativesky temporary weather files in EPW folder.\n", "Coercing year to 2021\n", "Filtering dates\n", "Saving file EPWs\\metdata_temp.csv, # points: 8760\n", "Calculating Sun position for Metdata that is right-labeled with a delta of -30 mins. i.e. 12 is 11:30 sunpos\n", "\n", "Module Name: test-module\n", "Module was shifted by 0.078 in X to avoid sensors on air\n", "This is a Cell-Level detailed module with Packaging Factor of 0.81 \n", "Module test-module updated in module.json\n", "Creating ~4 skyfiles. \n", "Created 4 skyfiles in /skies/\n", "\n", "Making ~4 .rad files for gendaylit 1-axis workflow (this takes a minute..)\n", "4 Radfiles created in /objects/\n", "\n", "Making 4 octfiles in root directory.\n", "Created 1axis_2021-11-06_1100.oct\n", "Created 1axis_2021-11-06_1200.oct\n", "Created 1axis_2021-11-06_1300.oct\n", "Created 1axis_2021-11-06_1400.oct\n", "Linescan in process: 1axis_2021-11-06_1100_Scene0_Row1_Module2_Front\n", "Linescan in process: 1axis_2021-11-06_1100_Scene0_Row1_Module2_Back\n", "Saved: results\\irr_1axis_2021-11-06_1100_Scene0_Row1_Module2.csv\n", "Index: 2021-11-06_1100. Wm2Front: 329.3102185185185. Wm2Back: 59.174216666666666\n", "Linescan in process: 1axis_2021-11-06_1200_Scene0_Row1_Module2_Front\n", "Linescan in process: 1axis_2021-11-06_1200_Scene0_Row1_Module2_Back\n", "Saved: results\\irr_1axis_2021-11-06_1200_Scene0_Row1_Module2.csv\n", "Index: 2021-11-06_1200. Wm2Front: 196.77327037037037. Wm2Back: 38.48871777777778\n", "Linescan in process: 1axis_2021-11-06_1300_Scene0_Row1_Module2_Front\n", "Linescan in process: 1axis_2021-11-06_1300_Scene0_Row1_Module2_Back\n", "Saved: results\\irr_1axis_2021-11-06_1300_Scene0_Row1_Module2.csv\n", "Index: 2021-11-06_1300. Wm2Front: 245.56651481481478. Wm2Back: 49.09279555555556\n", "Linescan in process: 1axis_2021-11-06_1400_Scene0_Row1_Module2_Front\n", "Linescan in process: 1axis_2021-11-06_1400_Scene0_Row1_Module2_Back\n", "Saved: results\\irr_1axis_2021-11-06_1400_Scene0_Row1_Module2.csv\n", "Index: 2021-11-06_1400. Wm2Front: 123.32471111111113. Wm2Back: 32.11295481481481\n" ] }, { "data": { "text/plain": [ "{'2021-11-06_1100': {'surf_azm': 90.0,\n", " 'surf_tilt': 32.06,\n", " 'theta': -32.06,\n", " 'dni': np.int64(203),\n", " 'ghi': np.int64(303),\n", " 'dhi': np.int64(191),\n", " 'temp_air': np.float64(19.4),\n", " 'wind_speed': np.float64(7.2),\n", " 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-11-06_1100.rad',\n", " 'scenes': [ : {'gcr': np.float64(0.4284), 'hpc': False, 'module': : {'x': np.float64(1.036), 'y': np.float64(2.092), 'z': 0.02, 'modulematerial': 'black', 'scenex': np.float64(1.046), 'sceney': np.float64(4.284), 'scenez': np.float64(0.1), 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020711 -0.15000000000000002\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020711 -0.05 -rx 45 -t 0 0 -0.1\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 -0.1\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 -0.1 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-11-06_1100__C_1.16_rtr_10.00_tilt_32_3modsx1rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 3, 'nRows': 1, 'tilt': 32.06, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': np.float64(2.3)}, 'text': '!xform -rx 32.06 -t 0 0 2.3 -a 3 -t 1.046 0 0 -a 1 -t 0 10 0 -i 1 -t -1.046 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}],\n", " 'octfile': '1axis_2021-11-06_1100.oct',\n", " 'AnalysisObj': [ : {'Back/FrontRatio': [0.18, 0.179, 0.178, 0.17, 0.154, 0.182, 0.188, 0.19, 0.193], 'Wm2Back': [60.327, 60.171, 59.696, 57.051, 41.987, 61.09, 63.204, 64.002, 65.04], 'Wm2Front': [335.442, 335.781, 336.234, 336.514, 273.072, 336.56, 336.807, 337.054, 336.329], 'backRatio': [0.18, 0.179, 0.178, 0.17, 0.154, 0.182, 0.188, 0.19, 0.193], 'hpc': False, 'mattype': array(['a1.0.a2.2.0.cellPVmodule.6457', 'a1.0.a2.4.0.cellPVmodule.6457',\n", " 'a1.0.a2.7.0.cellPVmodule.6457', 'a1.0.a2.9.0.cellPVmodule.6457',\n", " 'a1.0.octtube1a.6457', 'a1.0.a2.2.1.cellPVmodule.6457',\n", " 'a1.0.a2.4.1.cellPVmodule.6457', 'a1.0.a2.7.1.cellPVmodule.6457',\n", " 'a1.0.a2.9.1.cellPVmodule.6457'], dtype=object), 'modWanted': 2, 'name': '1axis_2021-11-06_1100_Scene0', 'octfile': '1axis_2021-11-06_1100.oct', 'power_data': None, 'rearMat': array(['a1.0.a2.2.0.cellPVmodule.2310', 'a1.0.a2.4.0.cellPVmodule.2310',\n", " 'a1.0.a2.7.0.cellPVmodule.2310', 'a1.0.a2.9.0.cellPVmodule.2310',\n", " 'sky', 'a1.0.a2.2.1.cellPVmodule.2310',\n", " 'a1.0.a2.4.1.cellPVmodule.2310', 'a1.0.a2.7.1.cellPVmodule.2310',\n", " 'a1.0.a2.9.1.cellPVmodule.2310'], dtype=object), 'rearX': [1.449, 1.086, 0.723, 0.36, -0.003, -0.366, -0.728, -1.092, -1.455], 'rearY': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'rearZ': [1.386, 1.613, 1.841, 2.068, 2.295, 2.523, 2.75, 2.977, 3.205], 'rowWanted': 1, 'sceneNum': 0, 'x': [1.466, 1.103, 0.74, 0.377, 0.014, -0.35, -0.712, -1.075, -1.438], 'y': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'z': [1.411, 1.639, 1.866, 2.094, 2.32, 2.547, 2.775, 3.004, 3.23]}]},\n", " '2021-11-06_1200': {'surf_azm': 90.0,\n", " 'surf_tilt': 9.27,\n", " 'theta': -9.27,\n", " 'dni': np.int64(5),\n", " 'ghi': np.int64(200),\n", " 'dhi': np.int64(197),\n", " 'temp_air': np.float64(20.0),\n", " 'wind_speed': np.float64(5.2),\n", " 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-11-06_1200.rad',\n", " 'scenes': [ : {'gcr': np.float64(0.4284), 'hpc': False, 'module': : {'x': np.float64(1.036), 'y': np.float64(2.092), 'z': 0.02, 'modulematerial': 'black', 'scenex': np.float64(1.046), 'sceney': np.float64(4.284), 'scenez': np.float64(0.1), 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020711 -0.15000000000000002\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020711 -0.05 -rx 45 -t 0 0 -0.1\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 -0.1\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 -0.1 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-11-06_1200__C_1.95_rtr_10.00_tilt_9_3modsx1rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 3, 'nRows': 1, 'tilt': 9.27, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': np.float64(2.3)}, 'text': '!xform -rx 9.27 -t 0 0 2.3 -a 3 -t 1.046 0 0 -a 1 -t 0 10 0 -i 1 -t -1.046 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}],\n", " 'octfile': '1axis_2021-11-06_1200.oct',\n", " 'AnalysisObj': [ : {'Back/FrontRatio': [0.177, 0.174, 0.172, 0.167, 0.349, 0.173, 0.18, 0.183, 0.186], 'Wm2Back': [34.819, 34.251, 33.808, 32.866, 68.729, 33.948, 35.339, 36.043, 36.596], 'Wm2Front': [196.751, 196.756, 196.762, 196.767, 196.772, 196.778, 196.783, 196.789, 196.802], 'backRatio': [0.177, 0.174, 0.172, 0.167, 0.349, 0.173, 0.18, 0.183, 0.186], 'hpc': False, 'mattype': array(['a1.0.a2.2.0.cellPVmodule.6457', 'a1.0.a2.4.0.cellPVmodule.6457',\n", " 'a1.0.a2.7.0.cellPVmodule.6457', 'a1.0.a2.9.0.cellPVmodule.6457',\n", " 'a1.0.octtube1a.6457', 'a1.0.a2.2.1.cellPVmodule.6457',\n", " 'a1.0.a2.4.1.cellPVmodule.6457', 'a1.0.a2.7.1.cellPVmodule.6457',\n", " 'a1.0.a2.9.1.cellPVmodule.6457'], dtype=object), 'modWanted': 2, 'name': '1axis_2021-11-06_1200_Scene0', 'octfile': '1axis_2021-11-06_1200.oct', 'power_data': None, 'rearMat': array(['a1.0.a2.2.0.cellPVmodule.2310', 'a1.0.a2.4.0.cellPVmodule.2310',\n", " 'a1.0.a2.7.0.cellPVmodule.2310', 'a1.0.a2.9.0.cellPVmodule.2310',\n", " 'sky', 'a1.0.a2.2.1.cellPVmodule.2310',\n", " 'a1.0.a2.4.1.cellPVmodule.2310', 'a1.0.a2.7.1.cellPVmodule.2310',\n", " 'a1.0.a2.9.1.cellPVmodule.2310'], dtype=object), 'rearX': [1.69, 1.268, 0.845, 0.422, -0.001, -0.423, -0.847, -1.27, -1.692], 'rearY': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'rearZ': [2.02, 2.088, 2.158, 2.227, 2.295, 2.365, 2.434, 2.502, 2.572], 'rowWanted': 1, 'sceneNum': 0, 'x': [1.695, 1.272, 0.85, 0.427, 0.004, -0.418, -0.842, -1.266, -1.688], 'y': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'z': [2.049, 2.117, 2.188, 2.256, 2.324, 2.395, 2.463, 2.531, 2.602]}]},\n", " '2021-11-06_1300': {'surf_azm': 90.0,\n", " 'surf_tilt': -14.87,\n", " 'theta': 14.87,\n", " 'dni': np.int64(3),\n", " 'ghi': np.int64(250),\n", " 'dhi': np.int64(249),\n", " 'temp_air': np.float64(20.0),\n", " 'wind_speed': np.float64(7.2),\n", " 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-11-06_1300.rad',\n", " 'scenes': [ : {'gcr': np.float64(0.4284), 'hpc': False, 'module': : {'x': np.float64(1.036), 'y': np.float64(2.092), 'z': 0.02, 'modulematerial': 'black', 'scenex': np.float64(1.046), 'sceney': np.float64(4.284), 'scenez': np.float64(0.1), 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020711 -0.15000000000000002\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020711 -0.05 -rx 45 -t 0 0 -0.1\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 -0.1\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 -0.1 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-11-06_1300__C_1.75_rtr_10.00_tilt_-15_3modsx1rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 3, 'nRows': 1, 'tilt': -14.87, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': np.float64(2.3)}, 'text': '!xform -rx -14.87 -t 0 0 2.3 -a 3 -t 1.046 0 0 -a 1 -t 0 10 0 -i 1 -t -1.046 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}],\n", " 'octfile': '1axis_2021-11-06_1300.oct',\n", " 'AnalysisObj': [ : {'Back/FrontRatio': [0.194, 0.19, 0.186, 0.182, 0.349, 0.168, 0.175, 0.177, 0.179], 'Wm2Back': [47.659, 46.663, 45.62, 44.597, 85.648, 41.271, 42.886, 43.441, 44.05], 'Wm2Front': [245.611, 245.601, 245.591, 245.581, 245.571, 245.561, 245.551, 245.522, 245.509], 'backRatio': [0.194, 0.19, 0.186, 0.182, 0.349, 0.168, 0.175, 0.177, 0.179], 'hpc': False, 'mattype': array(['a1.0.a2.2.0.cellPVmodule.6457', 'a1.0.a2.4.0.cellPVmodule.6457',\n", " 'a1.0.a2.7.0.cellPVmodule.6457', 'a1.0.a2.9.0.cellPVmodule.6457',\n", " 'a1.0.octtube1a.6457', 'a1.0.a2.2.1.cellPVmodule.6457',\n", " 'a1.0.a2.4.1.cellPVmodule.6457', 'a1.0.a2.7.1.cellPVmodule.6457',\n", " 'a1.0.a2.9.1.cellPVmodule.6457'], dtype=object), 'modWanted': 2, 'name': '1axis_2021-11-06_1300_Scene0', 'octfile': '1axis_2021-11-06_1300.oct', 'power_data': None, 'rearMat': array(['a1.0.a2.2.0.cellPVmodule.2310', 'a1.0.a2.4.0.cellPVmodule.2310',\n", " 'a1.0.a2.7.0.cellPVmodule.2310', 'a1.0.a2.9.0.cellPVmodule.2310',\n", " 'sky', 'a1.0.a2.2.1.cellPVmodule.2310',\n", " 'a1.0.a2.4.1.cellPVmodule.2310', 'a1.0.a2.7.1.cellPVmodule.2310',\n", " 'a1.0.a2.9.1.cellPVmodule.2310'], dtype=object), 'rearX': [1.657, 1.243, 0.829, 0.415, 0.001, -0.413, -0.827, -1.241, -1.655], 'rearY': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'rearZ': [2.734, 2.625, 2.514, 2.404, 2.295, 2.184, 2.074, 1.965, 1.855], 'rowWanted': 1, 'sceneNum': 0, 'x': [1.649, 1.235, 0.821, 0.407, -0.007, -0.421, -0.835, -1.249, -1.663], 'y': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'z': [2.764, 2.654, 2.543, 2.434, 2.324, 2.215, 2.104, 1.994, 1.885]}]},\n", " '2021-11-06_1400': {'surf_azm': 90.0,\n", " 'surf_tilt': -36.95,\n", " 'theta': 36.95,\n", " 'dni': np.int64(2),\n", " 'ghi': np.int64(136),\n", " 'dhi': np.int64(135),\n", " 'temp_air': np.float64(17.2),\n", " 'wind_speed': np.float64(6.7),\n", " 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-11-06_1400.rad',\n", " 'scenes': [ : {'gcr': np.float64(0.4284), 'hpc': False, 'module': : {'x': np.float64(1.036), 'y': np.float64(2.092), 'z': 0.02, 'modulematerial': 'black', 'scenex': np.float64(1.046), 'sceney': np.float64(4.284), 'scenez': np.float64(0.1), 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020711 -0.15000000000000002\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020711 -0.05 -rx 45 -t 0 0 -0.1\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 -0.1\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 -0.1 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-11-06_1400__C_1.01_rtr_10.00_tilt_-37_3modsx1rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 3, 'nRows': 1, 'tilt': -36.95, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': np.float64(2.3)}, 'text': '!xform -rx -36.95 -t 0 0 2.3 -a 3 -t 1.046 0 0 -a 1 -t 0 10 0 -i 1 -t -1.046 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}],\n", " 'octfile': '1axis_2021-11-06_1400.oct',\n", " 'AnalysisObj': [ : {'Back/FrontRatio': [0.268, 0.264, 0.26, 0.251, 0.376, 0.223, 0.235, 0.233, 0.232], 'Wm2Back': [33.11, 32.596, 32.041, 31.031, 46.393, 27.452, 29.017, 28.752, 28.626], 'Wm2Front': [123.516, 123.404, 123.29, 123.488, 123.341, 123.193, 123.34, 123.145, 123.205], 'backRatio': [0.268, 0.264, 0.26, 0.251, 0.376, 0.223, 0.235, 0.233, 0.232], 'hpc': False, 'mattype': array(['a1.0.a2.2.0.cellPVmodule.6457', 'a1.0.a2.4.0.cellPVmodule.6457',\n", " 'a1.0.a2.7.0.cellPVmodule.6457', 'a1.0.a2.9.0.cellPVmodule.6457',\n", " 'a1.0.octtube1a.6457', 'a1.0.a2.2.1.cellPVmodule.6457',\n", " 'a1.0.a2.4.1.cellPVmodule.6457', 'a1.0.a2.7.1.cellPVmodule.6457',\n", " 'a1.0.a2.9.1.cellPVmodule.6457'], dtype=object), 'modWanted': 2, 'name': '1axis_2021-11-06_1400_Scene0', 'octfile': '1axis_2021-11-06_1400.oct', 'power_data': None, 'rearMat': array(['a1.0.a2.2.0.cellPVmodule.2310', 'a1.0.a2.4.0.cellPVmodule.2310',\n", " 'a1.0.a2.7.0.cellPVmodule.2310', 'a1.0.a2.9.0.cellPVmodule.2310',\n", " 'sky', 'a1.0.a2.2.1.cellPVmodule.2310',\n", " 'a1.0.a2.4.1.cellPVmodule.2310', 'a1.0.a2.7.1.cellPVmodule.2310',\n", " 'a1.0.a2.9.1.cellPVmodule.2310'], dtype=object), 'rearX': [1.372, 1.029, 0.688, 0.345, 0.003, -0.339, -0.683, -1.024, -1.366], 'rearY': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'rearZ': [3.326, 3.068, 2.81, 2.555, 2.297, 2.04, 1.781, 1.523, 1.266], 'rowWanted': 1, 'sceneNum': 0, 'x': [1.354, 1.012, 0.67, 0.327, -0.015, -0.356, -0.7, -1.042, -1.384], 'y': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'z': [3.35, 3.092, 2.834, 2.578, 2.32, 2.062, 1.805, 1.547, 1.289]}]}}" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import bifacial_radiance\n", "from pathlib import Path\n", "import os\n", "\n", "testfolder = str(Path().resolve().parent.parent / 'bifacial_radiance' / 'TEMP' / 'Tutorial_06')\n", "if not os.path.exists(testfolder):\n", " os.makedirs(testfolder) \n", "\n", "simulationName = 'tutorial_6'\n", "moduletype = 'test-module' \n", "albedo = \"litesoil\" # this is one of the options on ground.rad\n", "lat = 37.5 \n", "lon = -77.6\n", "\n", "# Scene variables\n", "nMods = 3\n", "nRows = 1\n", "hub_height = 2.3 # meters\n", "pitch = 10 # meters # We will be using pitch instead of GCR for this example.\n", "\n", "# Traking parameters\n", "cumulativesky = False\n", "limit_angle = 45 # tracker rotation limit angle\n", "angledelta = 0.01 # we will be doing hourly simulation, we want the angle to be as close to real tracking as possible.\n", "backtrack = True \n", "\n", "#makeModule parameters\n", "# x and y will be defined by the cell-level module parameters\n", "xgap = 0.01\n", "ygap = 0.10\n", "zgap = 0.05\n", "numpanels = 2\n", "torquetube = True\n", "axisofrotationTorqueTube = False\n", "diameter = 0.1\n", "tubetype = 'Oct' # This will make an octagonal torque tube.\n", "material = 'black' # Torque tube will be made of this material (0% reflectivity)\n", "\n", "tubeParams = {'diameter':diameter,\n", " 'tubetype':tubetype,\n", " 'material':material,\n", " 'axisofrotation':axisofrotationTorqueTube,\n", " 'visible':torquetube}\n", "\n", "# Simulation range between two hours\n", "startdate = '11_06_11' # Options: mm_dd, mm_dd_HH, mm_dd_HHMM, YYYY-mm-dd_HHMM\n", "enddate = '11_06_14'\n", "\n", "# Cell Parameters\n", "numcellsx = 6\n", "numcellsy = 12\n", "xcell = 0.156\n", "ycell = 0.156\n", "xcellgap = 0.02\n", "ycellgap = 0.02\n", "\n", "demo = bifacial_radiance.RadianceObj(simulationName, path=testfolder) \n", "demo.setGround(albedo) \n", "epwfile = demo.getEPW(lat,lon) \n", "metdata = demo.readWeatherFile(epwfile, starttime=startdate, endtime=enddate) \n", "cellLevelModuleParams = {'numcellsx': numcellsx, 'numcellsy':numcellsy, \n", " 'xcell': xcell, 'ycell': ycell, 'xcellgap': xcellgap, 'ycellgap': ycellgap}\n", "mymodule = demo.makeModule(name=moduletype, xgap=xgap, ygap=ygap, zgap=zgap, \n", " numpanels=numpanels, cellModule=cellLevelModuleParams, tubeParams=tubeParams)\n", "\n", "sceneDict = {'pitch':pitch,'hub_height':hub_height, 'nMods': nMods, 'nRows': nRows} \n", "demo.set1axis(limit_angle=limit_angle, backtrack=backtrack, gcr=mymodule.sceney / pitch, cumulativesky=cumulativesky)\n", "demo.gendaylit1axis()\n", "demo.makeScene1axis(module=mymodule, sceneDict=sceneDict)\n", "demo.makeOct1axis()\n", "demo.analysis1axis()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Explore the RadianceObj" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Methods: ['addMaterial', 'analysis1axis', 'analysis1axisground', 'appendtoScene', 'calculatePerformance1axis', 'exportTrackerDict', 'genCumSky', 'genCumSky1axis', 'gendaylit', 'gendaylit1axis', 'gendaylit2manual', 'generate_spectra', 'generate_spectral_tmys', 'getEPW', 'getSingleTimestampTrackerAngle', 'getfilelist', 'loadtrackerdict', 'makeCustomObject', 'makeModule', 'makeOct', 'makeOct1axis', 'makeScene', 'makeScene1axis', 'printModules', 'readWeatherData', 'readWeatherFile', 'returnMaterialFiles', 'returnOctFiles', 'save', 'sceneNames', 'set1axis', 'setGround']\n", "\n", "Columns: ['Wm2Back', 'Wm2Front', 'basename', 'compiledResults', 'cumulativesky', 'data', 'epwfile', 'gencumsky_metfile', 'ground', 'hpc', 'hub_height', 'materialfiles', 'metdata', 'module', 'name', 'nowstr', 'octfile', 'path', 'results', 'scenes', 'skyfiles', 'trackerdict']\n" ] } ], "source": [ "print(f'Methods: {demo.methods}') # Shows all methods for top-level RadianceObj\n", "print(f'\\nColumns: {demo.columns}') # shows all data columns or attributes of RadianceObj, some of which are deprecated" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Explore the tracker dictionary\n", "\n", "You can use any of the below options to explore the tracking dictionary. Copy it into an empty cell to see their contents." ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "trackerdict element 2021-11-06_1100: {'surf_azm': 90.0, 'surf_tilt': 32.06, 'theta': -32.06, 'dni': np.int64(203), 'ghi': np.int64(303), 'dhi': np.int64(191), 'temp_air': np.float64(19.4), 'wind_speed': np.float64(7.2), 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-11-06_1100.rad', 'scenes': [ : {'gcr': np.float64(0.4284), 'hpc': False, 'module': : {'x': np.float64(1.036), 'y': np.float64(2.092), 'z': 0.02, 'modulematerial': 'black', 'scenex': np.float64(1.046), 'sceney': np.float64(4.284), 'scenez': np.float64(0.1), 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020711 -0.15000000000000002\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020711 -0.05 -rx 45 -t 0 0 -0.1\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 -0.1\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 -0.1 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-11-06_1100__C_1.16_rtr_10.00_tilt_32_3modsx1rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 3, 'nRows': 1, 'tilt': 32.06, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': np.float64(2.3)}, 'text': '!xform -rx 32.06 -t 0 0 2.3 -a 3 -t 1.046 0 0 -a 1 -t 0 10 0 -i 1 -t -1.046 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}], 'octfile': '1axis_2021-11-06_1100.oct', 'AnalysisObj': [ : {'Back/FrontRatio': [0.18, 0.179, 0.178, 0.17, 0.154, 0.182, 0.188, 0.19, 0.193], 'Wm2Back': [60.327, 60.171, 59.696, 57.051, 41.987, 61.09, 63.204, 64.002, 65.04], 'Wm2Front': [335.442, 335.781, 336.234, 336.514, 273.072, 336.56, 336.807, 337.054, 336.329], 'backRatio': [0.18, 0.179, 0.178, 0.17, 0.154, 0.182, 0.188, 0.19, 0.193], 'hpc': False, 'mattype': array(['a1.0.a2.2.0.cellPVmodule.6457', 'a1.0.a2.4.0.cellPVmodule.6457',\n", " 'a1.0.a2.7.0.cellPVmodule.6457', 'a1.0.a2.9.0.cellPVmodule.6457',\n", " 'a1.0.octtube1a.6457', 'a1.0.a2.2.1.cellPVmodule.6457',\n", " 'a1.0.a2.4.1.cellPVmodule.6457', 'a1.0.a2.7.1.cellPVmodule.6457',\n", " 'a1.0.a2.9.1.cellPVmodule.6457'], dtype=object), 'modWanted': 2, 'name': '1axis_2021-11-06_1100_Scene0', 'octfile': '1axis_2021-11-06_1100.oct', 'power_data': None, 'rearMat': array(['a1.0.a2.2.0.cellPVmodule.2310', 'a1.0.a2.4.0.cellPVmodule.2310',\n", " 'a1.0.a2.7.0.cellPVmodule.2310', 'a1.0.a2.9.0.cellPVmodule.2310',\n", " 'sky', 'a1.0.a2.2.1.cellPVmodule.2310',\n", " 'a1.0.a2.4.1.cellPVmodule.2310', 'a1.0.a2.7.1.cellPVmodule.2310',\n", " 'a1.0.a2.9.1.cellPVmodule.2310'], dtype=object), 'rearX': [1.449, 1.086, 0.723, 0.36, -0.003, -0.366, -0.728, -1.092, -1.455], 'rearY': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'rearZ': [1.386, 1.613, 1.841, 2.068, 2.295, 2.523, 2.75, 2.977, 3.205], 'rowWanted': 1, 'sceneNum': 0, 'x': [1.466, 1.103, 0.74, 0.377, 0.014, -0.35, -0.712, -1.075, -1.438], 'y': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'z': [1.411, 1.639, 1.866, 2.094, 2.32, 2.547, 2.775, 3.004, 3.23]}]}\n" ] } ], "source": [ "trackerkeys = sorted(demo.trackerdict.keys()) # get the trackerdict keys to see a specific hour.\n", "\n", "print(f'trackerdict element {trackerkeys[0]}: {demo.trackerdict[trackerkeys[0]]}') # This prints all trackerdict content" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[ : {'gcr': np.float64(0.4284), 'hpc': False, 'module': : {'x': np.float64(1.036), 'y': np.float64(2.092), 'z': 0.02, 'modulematerial': 'black', 'scenex': np.float64(1.046), 'sceney': np.float64(4.284), 'scenez': np.float64(0.1), 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020711 -0.15000000000000002\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020711 -0.05 -rx 45 -t 0 0 -0.1\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 -0.1\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 -0.1 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-11-06_1100__C_1.16_rtr_10.00_tilt_32_3modsx1rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 3, 'nRows': 1, 'tilt': 32.06, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': np.float64(2.3)}, 'text': '!xform -rx 32.06 -t 0 0 2.3 -a 3 -t 1.046 0 0 -a 1 -t 0 10 0 -i 1 -t -1.046 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}]" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "demo.trackerdict[trackerkeys[0]]['scene'] # This shows an array of Scene Object contents, one for each scene made in makeScene\n" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "scenex: 1.046\n", "sceneDict: {'pitch': 10, 'nMods': 3, 'nRows': 1, 'tilt': 32.06, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': np.float64(2.3)}\n" ] } ], "source": [ "print(f\"scenex: {demo.trackerdict[trackerkeys[0]]['scene'][0].module.scenex}\") # This shows the Module Object in the Scene's contents\n", "print(f\"sceneDict: {demo.trackerdict[trackerkeys[0]]['scene'][0].sceneDict}\") # Printing the scene dictionary saved in the Scene Object" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ : {'Back/FrontRatio': [0.18, 0.179, 0.178, 0.17, 0.154, 0.182, 0.188, 0.19, 0.193], 'Wm2Back': [60.327, 60.171, 59.696, 57.051, 41.987, 61.09, 63.204, 64.002, 65.04], 'Wm2Front': [335.442, 335.781, 336.234, 336.514, 273.072, 336.56, 336.807, 337.054, 336.329], 'backRatio': [0.18, 0.179, 0.178, 0.17, 0.154, 0.182, 0.188, 0.19, 0.193], 'hpc': False, 'mattype': array(['a1.0.a2.2.0.cellPVmodule.6457', 'a1.0.a2.4.0.cellPVmodule.6457',\n", " 'a1.0.a2.7.0.cellPVmodule.6457', 'a1.0.a2.9.0.cellPVmodule.6457',\n", " 'a1.0.octtube1a.6457', 'a1.0.a2.2.1.cellPVmodule.6457',\n", " 'a1.0.a2.4.1.cellPVmodule.6457', 'a1.0.a2.7.1.cellPVmodule.6457',\n", " 'a1.0.a2.9.1.cellPVmodule.6457'], dtype=object), 'modWanted': 2, 'name': '1axis_2021-11-06_1100_Scene0', 'octfile': '1axis_2021-11-06_1100.oct', 'power_data': None, 'rearMat': array(['a1.0.a2.2.0.cellPVmodule.2310', 'a1.0.a2.4.0.cellPVmodule.2310',\n", " 'a1.0.a2.7.0.cellPVmodule.2310', 'a1.0.a2.9.0.cellPVmodule.2310',\n", " 'sky', 'a1.0.a2.2.1.cellPVmodule.2310',\n", " 'a1.0.a2.4.1.cellPVmodule.2310', 'a1.0.a2.7.1.cellPVmodule.2310',\n", " 'a1.0.a2.9.1.cellPVmodule.2310'], dtype=object), 'rearX': [1.449, 1.086, 0.723, 0.36, -0.003, -0.366, -0.728, -1.092, -1.455], 'rearY': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'rearZ': [1.386, 1.613, 1.841, 2.068, 2.295, 2.523, 2.75, 2.977, 3.205], 'rowWanted': 1, 'sceneNum': 0, 'x': [1.466, 1.103, 0.74, 0.377, 0.014, -0.35, -0.712, -1.075, -1.438], 'y': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'z': [1.411, 1.639, 1.866, 2.094, 2.32, 2.547, 2.775, 3.004, 3.23]}]\n", "\n", "mattype: ['a1.0.a2.2.0.cellPVmodule.6457' 'a1.0.a2.4.0.cellPVmodule.6457'\n", " 'a1.0.a2.7.0.cellPVmodule.6457' 'a1.0.a2.9.0.cellPVmodule.6457'\n", " 'a1.0.octtube1a.6457' 'a1.0.a2.2.1.cellPVmodule.6457'\n", " 'a1.0.a2.4.1.cellPVmodule.6457' 'a1.0.a2.7.1.cellPVmodule.6457'\n", " 'a1.0.a2.9.1.cellPVmodule.6457']\n" ] } ], "source": [ "# Looking at the AnalysisObj results indivudally\n", "print(demo.trackerdict[trackerkeys[0]]['AnalysisObj'] ) # This shows an array of Analysis Object contents\n", "print(f\"\\nmattype: {demo.trackerdict[trackerkeys[0]]['AnalysisObj'][0].mattype}\" )# Addressing one of the variables in the Analysis Object" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
timestampnamemodNumrowNumsceneNumxyzrearZmattyperearMatWm2FrontWm2BackbackRatiorearXrearYsurf_azmsurf_tilttheta
02021-11-06_11001axis_2021-11-06_1100_Scene0210[1.466, 1.103, 0.7397, 0.377, 0.01367, -0.3496...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0][1.411, 1.639, 1.866, 2.094, 2.32, 2.547, 2.77...[1.386, 1.613, 1.841, 2.068, 2.295, 2.523, 2.7...[a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce...[a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce...[335.4420333333333, 335.78093333333334, 336.23...[60.32731333333333, 60.17080666666667, 59.6963...[0.17984369129343472, 0.17919608142506777, 0.1...[1.449, 1.086, 0.723, 0.3604, -0.00293, -0.366...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]90.032.06-32.06
12021-11-06_12001axis_2021-11-06_1200_Scene0210[1.695, 1.272, 0.8496, 0.4268, 0.003906, -0.41...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0][2.049, 2.117, 2.188, 2.256, 2.324, 2.395, 2.4...[2.02, 2.088, 2.158, 2.227, 2.295, 2.365, 2.43...[a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce...[a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce...[196.7508, 196.75609999999998, 196.76156666666...[34.81922333333333, 34.25118666666666, 33.8081...[0.17697029116548532, 0.17407852965238188, 0.1...[1.69, 1.268, 0.8447, 0.4219, -0.000977, -0.42...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]90.09.27-9.27
22021-11-06_13001axis_2021-11-06_1300_Scene0210[1.649, 1.235, 0.8213, 0.4072, -0.006836, -0.4...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0][2.764, 2.654, 2.543, 2.434, 2.324, 2.215, 2.1...[2.734, 2.625, 2.514, 2.404, 2.295, 2.184, 2.0...[a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce...[a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce...[245.61113333333333, 245.6013, 245.59126666666...[47.659349999999996, 46.66338, 45.619546666666...[0.19404314173404028, 0.18999569629437507, 0.1...[1.657, 1.243, 0.829, 0.415, 0.000977, -0.413,...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]90.0-14.8714.87
32021-11-06_14001axis_2021-11-06_1400_Scene0210[1.3545, 1.012, 0.67, 0.3271, -0.01465, -0.356...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0][3.35, 3.092, 2.834, 2.578, 2.32, 2.062, 1.805...[3.326, 3.068, 2.81, 2.555, 2.297, 2.04, 1.781...[a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce...[a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce...[123.51633333333332, 123.40366666666667, 123.2...[33.10988, 32.59641333333334, 32.04081, 31.030...[0.2680585720762538, 0.2641424689503909, 0.259...[1.372, 1.029, 0.6875, 0.3447, 0.00293, -0.338...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]90.0-36.9536.95
\n", "
" ], "text/plain": [ " timestamp name modNum rowNum sceneNum \\\n", "0 2021-11-06_1100 1axis_2021-11-06_1100_Scene0 2 1 0 \n", "1 2021-11-06_1200 1axis_2021-11-06_1200_Scene0 2 1 0 \n", "2 2021-11-06_1300 1axis_2021-11-06_1300_Scene0 2 1 0 \n", "3 2021-11-06_1400 1axis_2021-11-06_1400_Scene0 2 1 0 \n", "\n", " x \\\n", "0 [1.466, 1.103, 0.7397, 0.377, 0.01367, -0.3496... \n", "1 [1.695, 1.272, 0.8496, 0.4268, 0.003906, -0.41... \n", "2 [1.649, 1.235, 0.8213, 0.4072, -0.006836, -0.4... \n", "3 [1.3545, 1.012, 0.67, 0.3271, -0.01465, -0.356... \n", "\n", " y \\\n", "0 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] \n", "1 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] \n", "2 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] \n", "3 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] \n", "\n", " z \\\n", "0 [1.411, 1.639, 1.866, 2.094, 2.32, 2.547, 2.77... \n", "1 [2.049, 2.117, 2.188, 2.256, 2.324, 2.395, 2.4... \n", "2 [2.764, 2.654, 2.543, 2.434, 2.324, 2.215, 2.1... \n", "3 [3.35, 3.092, 2.834, 2.578, 2.32, 2.062, 1.805... \n", "\n", " rearZ \\\n", "0 [1.386, 1.613, 1.841, 2.068, 2.295, 2.523, 2.7... \n", "1 [2.02, 2.088, 2.158, 2.227, 2.295, 2.365, 2.43... \n", "2 [2.734, 2.625, 2.514, 2.404, 2.295, 2.184, 2.0... \n", "3 [3.326, 3.068, 2.81, 2.555, 2.297, 2.04, 1.781... \n", "\n", " mattype \\\n", "0 [a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce... \n", "1 [a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce... \n", "2 [a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce... \n", "3 [a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce... \n", "\n", " rearMat \\\n", "0 [a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce... \n", "1 [a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce... \n", "2 [a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce... \n", "3 [a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce... \n", "\n", " Wm2Front \\\n", "0 [335.4420333333333, 335.78093333333334, 336.23... \n", "1 [196.7508, 196.75609999999998, 196.76156666666... \n", "2 [245.61113333333333, 245.6013, 245.59126666666... \n", "3 [123.51633333333332, 123.40366666666667, 123.2... \n", "\n", " Wm2Back \\\n", "0 [60.32731333333333, 60.17080666666667, 59.6963... \n", "1 [34.81922333333333, 34.25118666666666, 33.8081... \n", "2 [47.659349999999996, 46.66338, 45.619546666666... \n", "3 [33.10988, 32.59641333333334, 32.04081, 31.030... \n", "\n", " backRatio \\\n", "0 [0.17984369129343472, 0.17919608142506777, 0.1... \n", "1 [0.17697029116548532, 0.17407852965238188, 0.1... \n", "2 [0.19404314173404028, 0.18999569629437507, 0.1... \n", "3 [0.2680585720762538, 0.2641424689503909, 0.259... \n", "\n", " rearX \\\n", "0 [1.449, 1.086, 0.723, 0.3604, -0.00293, -0.366... \n", "1 [1.69, 1.268, 0.8447, 0.4219, -0.000977, -0.42... \n", "2 [1.657, 1.243, 0.829, 0.415, 0.000977, -0.413,... \n", "3 [1.372, 1.029, 0.6875, 0.3447, 0.00293, -0.338... \n", "\n", " rearY surf_azm surf_tilt theta \n", "0 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] 90.0 32.06 -32.06 \n", "1 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] 90.0 9.27 -9.27 \n", "2 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] 90.0 -14.87 14.87 \n", "3 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] 90.0 -36.95 36.95 " ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Looking at the Analysis results Accumulated for the day:\n", "demo.results\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0 [60.32731333333333, 60.17080666666667, 59.6963...\n", "1 [34.81922333333333, 34.25118666666666, 33.8081...\n", "2 [47.659349999999996, 46.66338, 45.619546666666...\n", "3 [33.10988, 32.59641333333334, 32.04081, 31.030...\n", "Name: Wm2Back, dtype: object" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "demo.results.Wm2Back # this value is a series of arrays of every individual irradiance result for each hour simulated." ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
namemodNumrowNumsceneNumxyzrearZmattyperearMatWm2FrontWm2BackbackRatiorearXrearY
01axis_2021-11-06_1100_Scene0210[1.466, 1.103, 0.7397, 0.377, 0.01367, -0.3496...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0][1.411, 1.639, 1.866, 2.094, 2.32, 2.547, 2.77...[1.386, 1.613, 1.841, 2.068, 2.295, 2.523, 2.7...[a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce...[a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce...[335.4420333333333, 335.78093333333334, 336.23...[60.32731333333333, 60.17080666666667, 59.6963...[0.17984369129343472, 0.17919608142506777, 0.1...[1.449, 1.086, 0.723, 0.3604, -0.00293, -0.366...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
\n", "
" ], "text/plain": [ " name modNum rowNum sceneNum \\\n", "0 1axis_2021-11-06_1100_Scene0 2 1 0 \n", "\n", " x \\\n", "0 [1.466, 1.103, 0.7397, 0.377, 0.01367, -0.3496... \n", "\n", " y \\\n", "0 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] \n", "\n", " z \\\n", "0 [1.411, 1.639, 1.866, 2.094, 2.32, 2.547, 2.77... \n", "\n", " rearZ \\\n", "0 [1.386, 1.613, 1.841, 2.068, 2.295, 2.523, 2.7... \n", "\n", " mattype \\\n", "0 [a1.0.a2.2.0.cellPVmodule.6457, a1.0.a2.4.0.ce... \n", "\n", " rearMat \\\n", "0 [a1.0.a2.2.0.cellPVmodule.2310, a1.0.a2.4.0.ce... \n", "\n", " Wm2Front \\\n", "0 [335.4420333333333, 335.78093333333334, 336.23... \n", "\n", " Wm2Back \\\n", "0 [60.32731333333333, 60.17080666666667, 59.6963... \n", "\n", " backRatio \\\n", "0 [0.17984369129343472, 0.17919608142506777, 0.1... \n", "\n", " rearX \\\n", "0 [1.449, 1.086, 0.723, 0.3604, -0.00293, -0.366... \n", "\n", " rearY \n", "0 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] " ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# DataFrame of all results for one AnalysisObj. These are compiled in demo.results\n", "demo.trackerdict[trackerkeys[0]]['AnalysisObj'][0].results" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Explore Save Options\n", "\n", "The following lines offer ways to save your trackerdict or your demo object." ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Exporting TrackerDict\n", "2\n", "Saved to file results\\demopickle.pickle\n" ] } ], "source": [ "demo.exportTrackerDict(trackerdict = demo.trackerdict, savefile = 'results\\\\test_reindexTrue.csv', reindex = False)\n", "demo.save(savefile = 'results\\\\demopickle.pickle')\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.13" } }, "nbformat": 4, "nbformat_minor": 4 }